<?php
class User {
	private $username;
	private $content;
	
	public function __construct($username,$content) {
			$this->username = $username;
			$this->content = $content;
	}
	
	public function setUsername($username)
	{
			$this->username = $username;
	}
	
	public function setContent($content)
	{
			$this->content = $content;
	}
	
	public function getUsername() 
	{
			return $this->username;
	}
	
	public function getContent()
	{
			return $this->content;
	}
}

$user = new User("许孝极","测试Content");
echo $user->getUsername();
echo json_encode($user);
echo json_decode(json_encode($user));
?>